package cn.lzy.demo;

import cn.lzy.demo.service.AccountService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description xml配置 + @Transactional 实现声明式事务
 * @Author lzy
 * @Date 2024/1/2 11:49
 * @Version
 **/
public class TestDemoXml02 {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans2.xml");
        AccountService accountService = ctx.getBean(AccountService.class);
        accountService.transferMoney("yss", "lzy", 100.0);
    }
}
